#ifndef MAINBAR_H
#define MAINBAR_H

#include <QWidget>
#include "core/databasepool/databasepool.h"
#include "core/threadpool/threadpool.h"
#include "modules/user-management/usermanagement.h"
#include "modules/device-management/devicemanagement.h"
#include "modules/data-monitor/datamonitor.h"
#include "modules/alert-manager/alertmanager.h"
#include "modules/data-analysis/dataanalysis.h"
#include "LogManager.h"
#include <QSqlTableModel>

namespace Ui {
class Mainbar;
}

class Mainbar : public QWidget
{
    Q_OBJECT

public:
    explicit Mainbar(QWidget *parent = nullptr);
    ~Mainbar();

signals:
    void sendMessage(const QString &);
    void sendUsername(const QString &); // 新增发送用户名信号
    int display(int);

private:
    Ui::Mainbar *ui;
    // 创建用户管理对象，自动创建用户表
    UserManagement m_userMgr;
    QMap<QString, QVariant> userInfo;
    LogManager* m_logManager;

};

#endif // MAINBAR_H
